package tech.yixiyun.framework.kuafu.component.unregister;


import tech.yixiyun.framework.kuafu.enhance.annotation.Enhance;
import tech.yixiyun.framework.kuafu.log.LOGGER;

/**
 * 需要AOP的类解析，为其生成代理类
 */
public class EnhanceComponentUnregistrar implements IComponentUnregistrar {
    @Override
    public boolean unregister(Class clazz) {
        Enhance enhance = (Enhance) clazz.getAnnotation(Enhance.class);
        if (enhance == null || enhance.value().length == 0) {
            LOGGER.warn("请重启程序");
            return false;
        }

        return true;
    }

}
